package com.an.common.core.domain.bo;

import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * 发送代码业务对象
 *
 * @author: Ann
 * @createDate: 2023/06/07 11:14:55
 */
@Data
public class SendCodeBo  implements Serializable {

    private static final long serialVersionUID = 1540508911633332719L;
    /**
     * 电子邮件
     */
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    @Size(max = 50, message = "邮箱长度不能超过{max}个字符")
    private String email;

    /**
     * 电子邮件
     */
    @NotNull(message = "短信模板编码不能为空")
    @Pattern(regexp = "^[012]$", message = "错误的短信模板编码")
    private String type;
}
